<template>
  <el-dialog title="软件信息" :visible.sync="infoModalShow" :width="modalWidth">
    <el-row :gutter="20">
      <el-col :span="8" class="lable">
        版本:
      </el-col>
      <el-col :span="14" class="text">
        v1.4.4
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="8" class="lable">
        作者:
      </el-col>
      <el-col :span="14" class="text">
        杨柳
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="8" class="lable">
        QQ:
      </el-col>
      <el-col :span="14" class="text">
        574789490
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="8" class="lable">
        邮箱:
      </el-col>
      <el-col :span="14" class="text">
        yangliu817@126.com
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="8" class="lable">
        gitee:
      </el-col>
      <el-col :span="16" class="text">
        https://gitee.com/yangliu817/generator-helper
      </el-col>
    </el-row>
    <div slot="footer" class="dialog-footer">
      <el-button @click="infoModalShow = false">关 闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
  import {mapState} from "vuex";

  export default {
    name: "InfoModal",
    computed: {
      ...mapState(["modalWidth"]),
      infoModalShow: {
        get() {
          return this.$store.getters.infoModalShow;
        },
        set(flag) {
          this.$store.dispatch("infoModalShow", flag);
        }
      }
    },data(){
      return {
        name:"新建配置"
      }
    },methods:{
      saveSettings(){
        this.$store.dispatch("saveSettings",this.name);
        this.$store.dispatch("infoModalShow", false);
      }
    }
  }
</script>

<style scoped>
  .lable {
    text-align: right;
  }
  .text:hover {
    text-decoration:underline;
    color: blue;
  }

  .lable,.text {
    padding: 10px;
  }

</style>
